<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
<import type="js" file="js.jquery" />
<import type="js" file="js.common" />
<import type="css" file="css.global" />
<import type="css" file="css.form" />
<import type="js" file="js.jquery#form" />
</head>
<body>
<div class="search"><b>{$foldername}</b>
<input type="button" value="上传文件" class="button" onclick="upload({$id})" />
<input type="button" value="返回列表" class="button" onclick="back()" /></div>
<div class="list">
<table class="stripe" cellspacing="0">
    <thead>
        <tr>
            <th style="min-width: 30px;"><input type="checkbox" name="checkid" onclick="if(this.checked==true) { checkAll('key[]'); } else { clearAll('key[]'); }" ></th>
            <th width="70%">文件名</th>
            <th width="15%">上传时间</th>
            <th width="13%">操作</th>
        </tr>
    </thead>
 
    <tbody>
   	  <volist name="data_list" id="vo" empty="$empty">
        <tr>
            <td><input type="checkbox" name="key[]" value="{$vo.id}"></td>
            <td>{$vo.name|default="---"}</td>
            <td>{$vo.upload_time|default="---"}</td>
            <td>
            	<a href="__APP__/Database/download?id={$vo.id}&type={$type}" target="_black" >下载</a>
            	 | <a href="javascript:void(0)" onclick="del({$vo.id})">删除</a>
            </td>
        </tr>
      </volist>
    </tbody>
</table>
</div>
</body>
<script type="text/javascript">
function upload(id){
	window.location="__APP__/Database/upload?id="+id+'&type={$type}';
}
function del(id){
	if(confirm("确定删除该文件？删除之后不可恢复，请谨慎操作！")){
		$.get("__APP__/Database/delete?id="+id+"&type={$type}",function(result){
			alert(result);
			location.reload();
		});
	}else{
		return false;
	}
}
</script>
</html>